Codespaces

Megumi Oshima & Nicholas Ducharme-Barth

January 2025

What is Codespaces?

  • Development environment that is hosted in the cloud on GitHub.com
  • You control the specs of the machine!
  • Connected to your repository

Why use it?

  • Containerized environment
  • Anyone using it is working in the same environment
    • Same OS
    • Same software
    • Same package versions

“It works on my computer!”

Set Up

To set up a Codespace,

  1. Create a .devcontainer folder inside your repository
  2. Add a devcontainer.json file to that folder
  3. Set up devcontainer.json how you like (packages, software, extensions, etc.)
  4. Add a setup.r file if needed
  5. On main page of repository, “Code” -> “Create codespace on main”